package model;

public class AddressEditable extends AddressWrapper {
	
	private String country;
	private String locality;
	private String postalCode;
	private String region;
	private String street;
	
	public AddressEditable() {
		country = null;
		locality = null;
		postalCode = null;
		region = null;
		street = null;
	}
	
	public AddressEditable(String a, String b, String c, String d, String e) {
		super();
		street = a;
		postalCode = b;
		locality = c;
		region = d;
		country = e;
	}

	@Override
	public boolean existsCountryName() {
		if(this.country == null || this.country.trim().length() == 0) return false;
		return true;
	}

	@Override
	public boolean existsLocality() {
		if(this.locality == null || this.locality.trim().length() == 0) return false;
		return true;
	}

	@Override
	public boolean existsPostalCode() {
		if(this.postalCode == null || this.postalCode.trim().length() == 0) return false;
		return true;
	}

	@Override
	public boolean existsRegion() {
		if(this.region == null || this.region.trim().length() == 0) return false;
		return true;
	}

	@Override
	public boolean existsStreetAddress() {
		if(this.street == null || this.street.trim().length() == 0) return false;
		return true;
	}

	@Override
	public String getCountryName() {
		return this.country;
	}

	@Override
	public String getLocality() {
		return this.locality;
	}

	@Override
	public String getPostalCode() {
		return this.postalCode;
	}

	@Override
	public String getRegion() {
		return this.region;
	}

	@Override
	public String getStreet() {
		return this.street;
	}

	@Override
	public void setCountryName(String name) {
		this.country = name;
	}

	@Override
	public void setLocality(String loc) {
		this.locality = loc;
	}

	@Override
	public void setPostalCode(String code) {
		this.postalCode = code;
	}

	@Override
	public void setRegion(String name) {
		this.region = name;
	}

	@Override
	public void setStreet(String name) {
		this.street = name;
	}
	
	
	
}